/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Help;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.ImageIcon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.Timer;

/**
 *
 * @author Ahmed Salem®
 */
public class Animation extends JFrame {

    public Animation() {

        add(new moviengMessage(" **     Faculty of Computer& Information   **"));

    }

    public static void main(String A[]) {
        Animation frame = new Animation();
        frame.setTitle("Animation");
        frame.setVisible(true);

        frame.setSize(620, 405);

        frame.setLocationRelativeTo(null);
        frame.setFont(new Font("Helvetica", Font.CENTER_BASELINE, 15));
        frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

    static class moviengMessage extends JPanel {

        private String Message = " ";
        private String Message2 = " _         ==   Salem  Pad     == ";
        private String Message3 = " _  The Program build in JAVA";
        private String Message4 = " _  Its the First Virsion of the Program ";
        private String Message5 = " _  The Programe can open .txt files";
        private String Message6 = " _  The Programe can Save .sa files";
        private String Message7 = " _  The program Can Save Your Files in its Folder";
        private String Message8 = " _  The Programe can Change Font Style & Font Size";
        private String Message9 = " _  Change Your Font Style and enjoy";
        private String Message10 = " _  The Programe can Print Your txt files";
        private String Message11 = " _       Thanks for any one help me     ...";
        private String Message13 = " _  Presented by:...";
        private String Message14 = "                          .. AhmedEl Sayed  Salem ";
        private String Message15 = "                           # Thanks #";
          
        private int x = 130;
        private int y = 400;
    
                     
       

        public moviengMessage(String message) {
            this.Message = message;

            Timer tim = new Timer(150, new TimerListener());
            tim.start();
        }

        public void paintComponent(Graphics g) {
            super.paintComponent(g);

            ImageIcon im = new ImageIcon("icons/Salem-Pad.PNG");
            Image photo = im.getImage();
            g.drawImage(photo, 0, 0, this.getWidth(), this.getHeight(), this);


            if (y == -360) {
               y=490;
            }
            else
                y-=5;
         
          
            g.setColor(Color.RED);
            g.setFont(new Font("Times New Roman", 1, 20));
            g.drawString(Message, x, y);
            g.drawLine(165, 0, 165, 700);
            g.setColor(Color.black);
            g.drawString(Message2, x + 15, y + 60);
            g.setColor(Color.WHITE);
            g.drawString(Message3, x + 15, y + 100);
            g.drawString(Message4, x + 15, y + 130);
            g.drawString(Message5, x + 15, y + 160);
            g.drawString(Message6, x + 15, y + 190);
            g.drawString(Message7, x + 15, y + 220);
            g.drawString(Message8, x + 15, y + 250);
            g.drawString(Message9, x + 15, y + 280);
            g.drawString(Message10, x + 15, y + 320);
            g.drawString(Message11, x + 15, y + 360);
            g.drawString(Message13, x + 15, y + 420);
            g.setColor(Color.RED);
            g.drawString(Message14, x + 15, y + 460);
            g.setColor(Color.blue);
            g.drawString(Message15, x + 15, y + 480);
        }

        class TimerListener implements ActionListener {

            public void actionPerformed(ActionEvent e) {
                repaint();

            }
        }
    }
}
